1 00:00:00,600 --> 00:00:02,030 Hello and welcome. 2 00:00:02,040 --> 00:00:07,850 In this video we are going to be drawing the clock face. 3 00:00:07,860 --> 00:00:15,470 This will involve modifying the code we had in our previous lecture. 4 00:00:15,630 --> 00:00:18,810 So this is where we left off in the previous lecture. 5 00:00:18,960 --> 00:00:28,410 We created a function called drop clock and when to actually modify this function I'm going to do is 6 00:00:28,410 --> 00:00:33,250 also create on another function called draw face. 7 00:00:33,340 --> 00:00:39,010 I am going to reference that function from inside this drawer clock function. 8 00:00:39,480 --> 00:00:43,920 So I'm going to modify this function here. 9 00:00:44,140 --> 00:00:46,700 I'll get rid of all this. 10 00:00:48,900 --> 00:00:56,600 And just the other function I'm going to create is going to be a function called drop face. 11 00:00:56,640 --> 00:01:00,010 So I'm just going to reference that function here. 12 00:01:00,020 --> 00:01:01,380 I've not created it yet. 13 00:01:01,380 --> 00:01:04,350 I'm going to create it very shortly. 14 00:01:04,350 --> 00:01:17,480 And for the inside the parentheses I'm going to pass saying they say t x and the radius O K. 15 00:01:17,520 --> 00:01:24,510 All right so now let's create the function here called draw fix. 16 00:01:25,230 --> 00:01:34,830 So I have added a block of code for this new function called drop face and thus the function we are 17 00:01:34,830 --> 00:01:41,220 referencing from the drawer clock function which is the function that we have modified. 18 00:01:41,220 --> 00:01:44,890 So I'm just going to run through this block of code. 19 00:01:45,000 --> 00:01:48,230 Be so that would know what's happening here. 20 00:01:48,810 --> 00:01:56,970 So inside the draw phase function we've got to perimeter's the context and call the radius and in between 21 00:01:56,970 --> 00:01:59,930 the curly Is this the opening curly braces. 22 00:01:59,940 --> 00:02:01,660 And this is close in Culebra. 23 00:02:01,690 --> 00:02:06,740 It contains the code that will draw the face for the clock. 24 00:02:06,900 --> 00:02:08,830 So we've got a variable called grabbed. 25 00:02:08,850 --> 00:02:11,510 This is going to be for the gradient. 26 00:02:11,820 --> 00:02:22,120 And then we've got the this code here is from line 14 to line 17. 27 00:02:22,160 --> 00:02:30,370 This block of code here is going to draw the outroar white circle for the face. 28 00:02:30,390 --> 00:02:39,030 So here we call it online 14 we want to begin part of the bargain path method basically begins a path 29 00:02:39,630 --> 00:02:44,190 or can be used to reset the current path. 30 00:02:44,370 --> 00:02:47,370 So this is where the actual path begins. 31 00:02:48,030 --> 00:02:57,660 And Line 14 here we use in the arc method to actually draw the white the circle underneath the perimeters 32 00:02:58,200 --> 00:03:00,770 that will enable that to happen. 33 00:03:00,780 --> 00:03:02,270 This is the master PI. 34 00:03:02,290 --> 00:03:08,610 I explained what that was in our previous lecture and also explained what the film's title does so just 35 00:03:08,610 --> 00:03:12,970 gives it the white face or the background. 36 00:03:13,220 --> 00:03:17,760 The also explained or be contex top feel method. 37 00:03:17,880 --> 00:03:26,560 So the content self feel metod basically feels the current draw in part on line. 38 00:03:26,640 --> 00:03:30,500 A team here we use is variable. 39 00:03:30,500 --> 00:03:33,640 We create it here online Petit called Ghairat. 40 00:03:33,690 --> 00:03:46,500 Basically we are creating a radial gradient which is 95 percent and 1 0 5 percent off the or original 41 00:03:46,530 --> 00:03:54,420 clock radius line 19 to line 20 to 1. 42 00:03:54,420 --> 00:04:04,740 Basically we are creating three colour stops corresponding with that in the middle and the outer edge 43 00:04:05,010 --> 00:04:06,550 of the arc. 44 00:04:06,750 --> 00:04:17,160 Okay so this core loss here represents the inner the middle and outer edge of the arc which is from 45 00:04:17,160 --> 00:04:22,760 line 19 to line twenty one. 46 00:04:23,400 --> 00:04:32,840 Just to note that this core loss top here the colossi top basically is used to create a 3 d e effect. 47 00:04:32,910 --> 00:04:44,540 Next on line 22 here I am defining the gradient as the stroke style of the draw in object. 48 00:04:45,060 --> 00:04:47,170 Line twenty three. 49 00:04:47,490 --> 00:04:53,130 I am define in the line with of the drone object weights. 50 00:04:53,160 --> 00:04:54,200 He is here. 51 00:04:54,210 --> 00:05:05,850 Which would be 10 percent of the radius line 24 we use in this drill method to draw the circle and we 52 00:05:05,850 --> 00:05:11,710 use the block of kord from line 25 to line twenty eight. 53 00:05:11,970 --> 00:05:19,270 To draw the outer wall clock centre so to draw a centre for the clock anywhere you see the big impact 54 00:05:19,360 --> 00:05:22,760 metter basically means there's a path going on here. 55 00:05:22,770 --> 00:05:27,130 This is the beginning and then it will end with the feel here. 56 00:05:27,180 --> 00:05:32,880 So this block of code here twenty five to twenty eight is used to draw B. 57 00:05:32,890 --> 00:05:36,670 Our chool Centre for the clock. 58 00:05:37,030 --> 00:05:45,920 So that is basically it is going to save this and we go back to our hastier. 59 00:05:46,260 --> 00:05:46,920 So a double. 60 00:05:47,360 --> 00:05:48,380 On the clock. 61 00:05:48,380 --> 00:05:55,370 Dr. hastier male and hopefully a girl so this is exactly how I wanted to be. 62 00:05:55,400 --> 00:05:57,660 So this is our travel centre. 63 00:05:57,790 --> 00:05:59,140 Off the clock. 64 00:05:59,150 --> 00:06:03,390 So we now have a face for power. 65 00:06:03,680 --> 00:06:11,750 So in the next lecture will create that function that will be used for the clock numbers. 66 00:06:11,870 --> 00:06:12,900 Thanks for watching. 67 00:06:12,950 --> 00:06:13,760 And by phone.